import request from '@/utils/request'

// 查询商品营销列表
export function listMarketing(query) {
  return request({
    url: '/marketing/marketing/list',
    method: 'get',
    params: query
  })
}

// 查询商品营销详细
export function getMarketing(methodsId) {
  return request({
    url: '/marketing/marketing/' + methodsId,
    method: 'get'
  })
}

// 新增商品营销
export function addMarketing(data) {
  return request({
    url: '/marketing/marketing',
    method: 'post',
    data: data
  })
}

// 修改商品营销
export function updateMarketing(data) {
  return request({
    url: '/marketing/marketing',
    method: 'put',
    data: data
  })
}

// 删除商品营销
export function delMarketing(methodsId) {
  return request({
    url: '/marketing/marketing/' + methodsId,
    method: 'delete'
  })
}
